<?php
use yii\helpers\Url;

$web = Url::to("@web");
//$img = Url::to("@web/img/special/dragon-ball");
$img = "http://dorabox-10018656.file.myqcloud.com/wxmall/longzhu";
$link = Url::home(true) . '/';
//$link = "";
//if (YII_ENV == 'dev') {
//    $link = "http://wxdev.duolahe.com/biz_weixin/web/index.php/";
//} else {
//    $link = "http://wx.duolahe.com/biz_weixin/web/index.php/";
//}

?>

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>端午朵拉礼卡</title>
    <script src="<?= $web ?>/js/jquery.js"></script>
    <link href="<?= $web ?>/css/special/dragon-global.css" rel="stylesheet" type="text/css">
    <link href="<?= $web ?>/css/special/dragon-card.css" rel="stylesheet" type="text/css">
    <script>
        $(function ($) {
            var w = $(document).width();
            if (w > 640) {
                w = 640;
            }
            $("html").css("font-size", w * 20 / 320);
        });

        function href_card_list(id) {
            id = encodeURI(id);
            window.location.href = "<?=Url::to(["wx-biz/card-detail"]);?>?id=" + id;
        }

        function link() {
            Location.href = "http://mp.weixin.qq.com/s?__biz=MzI3MDEyNjc5Nw==&mid=504653442&idx=2&sn=b75888d694f407811dda8fe77c6b7119&scene=0&previewkey=oB09Fa0bqgBa5TisFPdWicNS9bJajjJKzz%2F0By7ITJA%3D#wechat_redirect";
        }
    </script>
</head>
<body>
<div class="main">
    <a href="http://mp.weixin.qq.com/s?__biz=MzI3MDEyNjc5Nw==&mid=504653442&idx=2&sn=b75888d694f407811dda8fe77c6b7119&scene=0&previewkey=oB09Fa0bqgBa5TisFPdWicNS9bJajjJKzz%2F0By7ITJA%3D#wechat_redirect">
        <img src="<?= $web ?>/img/special/dragon-card/dragon-card-1.jpg" style="width: 16rem;">
    </a>
    <div class="card">
        <?php
        foreach ($list as $item) {
            ?>
            <div class="card-div" onclick="href_card_list('<?= $item['ID'] ?>')">
                <div class="card-img">
                    <img src="<?= $item['CARD_ONE'] ?>" style="width: 4.75rem;height: 5.75rem">
                </div>
                <div class="card-words">
                    <span class="name"><?= $item['NAME'] ?></span>&nbsp;￥<span><?= floatval($item['PRICE']) ?></span>
                </div>
            </div>
            <?php
        }
        ?>
    </div>
</div>
</body>
</html>